<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class Home extends Controller
{
    //
    public function index(){

        // dd(request()->server());
        return view('admin.home.index');
    }
    public function loginout(){

      

            $result=session()->flush();
            if(!$result){
                $msg=[
                    'code'=>1,
                    'msg'=>'退成登录成功',
                    'url'=>url('admin')
                ];
            }else{
                $msg=[
                    'code'=>0,
                    'msg'=>'退出登录失败'
                ];
            }
            return $msg;
    }

}
